<template>
  <div class="activist-data">
    <div class="title">处理维权数据</div>
    <div class="activist-container">
      <el-row>
        <el-col :span="12" class="block">
          <div class="icon"></div>
          <div class="content">
            <p>累计维权</p>
            <p>{{data.total}}条</p>
          </div>
        </el-col>
        <el-col :span="12" class="block">
          <div class="icon"></div>
          <div class="content">
            <p>已处理维权</p>
            <p>{{data.dealed}}条</p>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12" class="block">
          <div class="icon"></div>
          <div class="content">
            <p>未处理维权</p>
            <p>{{data.undo}}条</p>
          </div>
        </el-col>
        <el-col :span="12" class="block">
          <div class="icon"></div>
          <div class="content">
            <p>已挽回损失</p>
            <p>{{data.money | formatMoney}}</p>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ActivistData',
  props: {
    data: {
      type: Object,
      required: true
    }
  },
  filters: {
    formatMoney(v) {
      return `${(v / 10000).toFixed(2)}万`;
    }
  }
}
</script>

<style lang="less" scoped>
  .activist-data {
    margin-left: 20px;
    .title {
      margin-bottom: 20px;
      padding-left: 20px;
      border-left: 4px solid #1d79ff;
      font-size: 20px;
      font-weight: 600;
    }
    .activist-container {
      padding: 30px 20px 0 20px;
      border-radius: 10px;
      background-color: #fff;
    }
    .block {
      display: flex;
      margin-bottom: 30px;
      .icon {
        flex: 0 0 60px;
      }
    }
  }
</style>
